import 'package:gold/generated/json/base/json_convert_content.dart';
import 'package:gold/model/gold_recover_shop_model.dart';

GoldRecoverShopModel $GoldRecoverShopModelFromJson(Map<String, dynamic> json) {
  final GoldRecoverShopModel goldRecoverShopModel = GoldRecoverShopModel();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    goldRecoverShopModel.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    goldRecoverShopModel.name = name;
  }
  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
  if (createdAt != null) {
    goldRecoverShopModel.createdAt = createdAt;
  }
  final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
  if (updatedAt != null) {
    goldRecoverShopModel.updatedAt = updatedAt;
  }
  final String? contactName = jsonConvert.convert<String>(json['contact_name']);
  if (contactName != null) {
    goldRecoverShopModel.contactName = contactName;
  }
  final String? contactMobile = jsonConvert.convert<String>(json['contact_mobile']);
  if (contactMobile != null) {
    goldRecoverShopModel.contactMobile = contactMobile;
  }
  final String? workingTime = jsonConvert.convert<String>(json['working_time']);
  if (workingTime != null) {
    goldRecoverShopModel.workingTime = workingTime;
  }
  final String? closingTime = jsonConvert.convert<String>(json['closing_time']);
  if (closingTime != null) {
    goldRecoverShopModel.closingTime = closingTime;
  }
  final String? province = jsonConvert.convert<String>(json['province']);
  if (province != null) {
    goldRecoverShopModel.province = province;
  }
  final String? city = jsonConvert.convert<String>(json['city']);
  if (city != null) {
    goldRecoverShopModel.city = city;
  }
  final String? area = jsonConvert.convert<String>(json['area']);
  if (area != null) {
    goldRecoverShopModel.area = area;
  }
  final String? address = jsonConvert.convert<String>(json['address']);
  if (address != null) {
    goldRecoverShopModel.address = address;
  }
  return goldRecoverShopModel;
}

Map<String, dynamic> $GoldRecoverShopModelToJson(GoldRecoverShopModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['created_at'] = entity.createdAt;
  data['updated_at'] = entity.updatedAt;
  data['contact_name'] = entity.contactName;
  data['contact_mobile'] = entity.contactMobile;
  data['working_time'] = entity.workingTime;
  data['closing_time'] = entity.closingTime;
  data['province'] = entity.province;
  data['city'] = entity.city;
  data['area'] = entity.area;
  data['address'] = entity.address;
  return data;
}

extension GoldRecoverShopModelExtension on GoldRecoverShopModel {
  GoldRecoverShopModel copyWith({
    int? id,
    String? name,
    String? createdAt,
    String? updatedAt,
    String? contactName,
    String? contactMobile,
    String? workingTime,
    String? closingTime,
    String? province,
    String? city,
    String? area,
    String? address,
  }) {
    return GoldRecoverShopModel()
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..createdAt = createdAt ?? this.createdAt
      ..updatedAt = updatedAt ?? this.updatedAt
      ..contactName = contactName ?? this.contactName
      ..contactMobile = contactMobile ?? this.contactMobile
      ..workingTime = workingTime ?? this.workingTime
      ..closingTime = closingTime ?? this.closingTime
      ..province = province ?? this.province
      ..city = city ?? this.city
      ..area = area ?? this.area
      ..address = address ?? this.address;
  }
}